ig.module(
	'game.entities.nextButton'
)
.requires(
	'impact.entity',
        'game.entities.base.baseButton'
)
.defines(function()
{
    EntityNextButton = EntityBaseButton.extend(
    {
        normalButton: new ig.Image("media/images/next.png"),
        overButton: new ig.Image("media/images/nextOver.png"),
	
	init: function(x, y, settings)
	{
	    this.parent(x, y, settings);	    
	},
	
        draw: function()
        {
	    if (ig.global.currentQuestion < ig.global.numberOfQuestions - 1)
	    {
		this.canHover = true;
		this.toBeDrawed = true;
	    }
	    else
	    {
		this.canHover = false;
		this.toBeDrawed = false;
	    }
	    
	    this.parent();	    
	},
	
        onClick: function()
        {
            this.parent();
	    
	    if (ig.global.currentQuestion < ig.global.numberOfQuestions - 1)
	    {
		ig.global.currentQuestion++;
		ig.global.questionChanged = true;		
	    }
        },	
    });
});